import initAssetRegisters from "./asset.js"
import initExtend from "./initExtend.js"

const ASSETS_TYPE = ['component', 'directive', 'filter']
export function initGlobalApi(Vue) {
  Vue.options = {}
  ASSETS_TYPE.forEach(type => {
    Vue.options[type + 's'] = {}
  })
  Vue.options._base = Vue
  initExtend(Vue) //extend定义方法
  initAssetRegisters(Vue)
}